package com.zhuss.product.preline;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.product.preline.DetailPrelineBo;
import com.zhuss.bean.bo.product.preline.SearchPrelineBo;
import com.zhuss.common.ReadService;
import com.zhuss.product.processor.PrelineRead;
import com.zhuss.exception.DzcxException;

/**
 * @description: 招募查询Service
 * @author: mkh
 * @create: Mon Jan 04 13:38:02 CST 2021
 **/
@Component("prelineReadService")
public class PrelineReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("prelineRead")
	private PrelineRead prelineRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws DzcxException {
		DetailPrelineBo bo = (DetailPrelineBo) param;
		Long prelineId = bo.getPrelineId();
		Object vo = prelineRead.detail(prelineId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchPrelineBo bo = (SearchPrelineBo) param;
		Object result = prelineRead.list(bo);
		return result;
	}

	/**
	 * 绑定站点列表
	 */
	public Object bindSiteList(Object param) throws DzcxException {
		DetailPrelineBo bo = (DetailPrelineBo) param;
		Long lineId = bo.getPrelineId();
		Object vo = prelineRead.bindSiteList(lineId);
		return vo;
	}

	public Object prelinelist(Object param) {
		SearchPrelineBo bo = (SearchPrelineBo) param;
		Object result = prelineRead.Prelinelist(bo);
		return result;
	}
}

